package holiday_demo.classAndInterface.demo10;

public class Hero {
    private String name;
    private Skills skills;//技能

    public Hero() {
    }

    public Hero(String name, Skills skills) {
        this.name = name;
        this.skills = skills;
    }

    public String getName() {
        return name;
    }
    public void attack(){
        System.out.println(name+"释放技能：");
        skills.use();
        System.out.println("技能释放完成!\n");

    }
    public void setName(String name) {
        this.name = name;
    }

    public Skills getSkills() {
        return skills;
    }

    public void setSkills(Skills skills) {
        this.skills = skills;
    }
}
